//
//  PKLTView.m
//  PianKe
//
//  Created by lanou on 15/12/24.
//  Copyright © 2015年 KFC. All rights reserved.
//

#import "PKLTView.h"

@implementation PKLTView

- (instancetype)initWithFrame:(CGRect)frame label:(NSString *)labelName textField:(NSString *)placeholdertextField{
    
    self = [super initWithFrame:frame];
    if (self) {
        
        _label = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, frame.size.width / 6,  frame.size.height)];
        _label.text = labelName;
        _label.font = [UIFont systemFontOfSize:13];
        [self addSubview:_label];
        
        
        _textField = [[UITextField alloc]initWithFrame:CGRectMake(_label.frame.origin.x + _label.frame.size.width, _label.frame.origin.y, frame.size.width - _label.frame.size.width,  frame.size.height)];
        _textField.font = [UIFont systemFontOfSize:13];
        _textField.placeholder = placeholdertextField;
        _textField.textAlignment = NSTextAlignmentCenter;
        [self addSubview:_textField];
        
        UILabel *line = [[UILabel alloc]initWithFrame:CGRectMake(0, frame.size.height, frame.size.width, 0.5*kHeightBase)];
        line.backgroundColor = [UIColor blackColor];
        [self addSubview:line];
    }
    return self;
}



@end
